package com.JaMorant.SSM.thc.controller;


import com.JaMorant.SSM.result.Result;
import com.JaMorant.SSM.thc.service.GoodsConfigService;
import com.JaMorant.SSM.thc.service.PddOrderService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * 导入快递
 */
@RestController
@RequestMapping(value = "/admin/pddOrder")
public class OrderController {

    @Autowired
    private PddOrderService pddOrderService;



    @ApiOperation("导入交易")
    @PostMapping("/importTrade")
    public Result importTrade(MultipartFile file) {
        pddOrderService.importData(file);
        return Result.ok(null);
    }

    @ApiOperation("导入生产成本和快递成本")
    @PostMapping("/importDelivery")
    public Result importDelivery(MultipartFile file) {
        pddOrderService.importDelivery(file);
        return Result.ok(null);
    }
}

